package com.thoughtworks.turtlemock.expression;

public class Pair {
    private final String from;
    private final String to;

    public Pair(String from, String to) {
        this.from = from;
        this.to = to;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        final Pair pair = (Pair) o;

        if (from != null ? !from.equals(pair.from) : pair.from != null) return false;
        if (to != null ? !to.equals(pair.to) : pair.to != null) return false;

        return true;
    }

    public int hashCode() {
        int result;
        result = (from != null ? from.hashCode() : 0);
        result = 29 * result + (to != null ? to.hashCode() : 0);
        return result;
    }
}
